<template>
  <div class="showTable">
    <div class="table">
      <div class="table-tr thead">
        <div class="table-th">模块</div>
        <div class="table-th">评分点</div>
        <div class="table-th">是否得分</div>
        <div class="table-th">得分</div>
      </div>
      <div class="table-tr tbody" v-for="(item, key, index) in showdata">
        <div class="table-th">
          {{ key }}
        </div>
        <div class="table-th">
          <p v-for="item2 in item">{{ item2.sentence }}</p>
        </div>
        <div class="table-th">
          <p v-for="item2 in item">{{ item2.score == 0 ? 'no' : 'ok' }}</p>
        </div>
        <div class="table-th">
          <p v-for="item2 in item">{{ item2.score }}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'showTable',
  props: ['showdata'],
  data() {
    return {};
  },
  created() {},
  methods: {},
  mounted() {
    console.log(this.showdata, 'sssss');
  },
};
</script>

<style scoped>
.table,
.table * {
  margin: 0 auto;
  padding: 0;
  font-size: 14px;
}
.table {
  display: table;
  width: 100%;
  border-collapse: collapse;
  color: #303030;
  font-size: 16px;
}
.thead {
  height: 35px;
  background: #f4f4f4;
  font-weight: bold;
}
.table-tr {
  display: table-row;
}
.table-th {
  display: table-cell;
  height: 100%;
  border: 1px solid #dcdcdd;
  box-sizing: border-box;
  text-align: center;
  vertical-align: middle;
}
.table-td {
  display: table-cell;
  height: 100%;
  border: 1px solid gray;
  text-align: center;
  vertical-align: middle;
}
.tbody .table-th {
  color: #303030;
  font-size: 16px;
}
.tbody p {
  background-color: #fff;
}
.tbody p:nth-of-type(2n-1) {
  background-color: #ededed;
}
.tbody:nth-of-type(2n) {
  background-color: #ededed;
}
.tbody p {
  display: flex;
  align-items: center;
  min-height: 32px;
  justify-content: center;
  border-bottom: 1px solid #dcdcdd;
}
</style>
